package Mr.Right.action;

import java.util.Map;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.SessionAware;
import org.apache.struts2.util.ServletContextAware;

import Mr.Right.service.ServiceManager;

import com.opensymphony.xwork2.ActionSupport;

public class BaseAction extends ActionSupport implements
	ServletRequestAware, ServletContextAware,SessionAware
	{
	
	
		private static final long serialVersionUID = -8666333588376599236L;
	
		protected String result;  //保存处理结果的信息
		protected HttpServletRequest request;
		@SuppressWarnings("unchecked")
		protected Map session;
		protected ServletContext context;
		protected ServiceManager serviceManager;
		public void setServletContext(ServletContext context){
			this.context = context;         
		}
	
		public void setServletRequest(HttpServletRequest request){
			this.request = request;   
		}
	
		public void setSession(Map<String,Object> session)
		{
			this.session = session;
		}
	
		public String getResult()
		{
			return result;
		}
	
		public void setResult(String result)
		{
			this.result = result;
		}

        public ServiceManager getServiceManager()
        {
            return serviceManager;
        }

        public void setServiceManager(ServiceManager serviceManager)
        {
            this.serviceManager = serviceManager;
        }
	}